package com.tx.studentManager.service;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.tx.studentManager.dao.MajorDao;
import com.tx.studentManager.model.Major;
import com.tx.studentManager.qo.MajorQO;
/**
 * 
* @描述 专业操作服务
* @since studentManager-admin 1.0
* @version 1.0 2015-9-14 下午3:06:00
* @author 此生唯晴
 */
@Service
@Transactional
public class MajorService extends BaseService<Major, String, MajorDao, MajorQO> {
	@Autowired 
	MajorDao majorDao;
	
	@Override
	protected MajorDao getDao() {
		return majorDao;
	}

	@Override
	public Major insert(Major model) {
		if (model.getCreateDate()==null) {
			model.setCreateDate(new Date());
		}
		return super.insert(model);
	}

	
}
